<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        let arrAll = [4, 0, 9, 5, 0, 20, 3, 0, 11, 0, 0, 10]
        let arrAlls = []
        for (i = 0; i <= arrAll.length; i++) {
            if (arrAll[i] !== 0) {
                arrAlls.push(arrAll[i])

            }
        }
        document.write(arrAlls)
    </script>
</body>

</html>